home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 August / Ahoy_Magazine_85-08_1985_Double_L.d64 / complex gunshot (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  781b  |  25 lines

  1. 0 print"[147]":poke53280,0:poke53281,6:poke646,1
  2. 1 rem sound effects
  3. 2 rem complex gunshot
  4. 3 rem (note that lines 100 and above are "support"--lines 20-90 make the sound)
  5. 10 gosub 900:goto 100
  6. 20 poke ad(1),5:poke sr(1),53:poke fl(1),30:poke fh(1),30
  7. 25 poke ad(0),5:poke sr(0),53 :poke fh(0),250
  8. 30 poke vl,15:print "."
  9. 40 poke gt(1),129:for i=0 to 29:next:poke gt(0),17
  10. 50 for i=225 to 25 step -25:poke fh(0),i:next
  11. 60 poke gt(1),0:poke gt(0),0
  12. 90 return
  13. 99 rem routine to play sounds when shift is pressed
  14. 100 print "press shift to hear sound";
  15. 110 if peek(653)=0 then 110
  16. 120 gosub 20:goto 100
  17. 898 rem routine to set up variables
  18. 899 rem set up sound control addresses
  19. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  20. 905 for i=1 to 2:x=i*7:fl(i)=fl(0)+x:fh(i)=fh(0)+x:gt(i)=gt(0)+x:ad(i)=ad(0)+x
  21. 906 sr(i)=sr(0)+x:next
  22. 909 rem set volume address
  23. 910 vl=54296
  24. 990 return
  25.